home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / sys-include / powerup / ppcpragmas / cia_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-03-13  |  3KB  |  99 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_CIA_H
  4. #define _PPCPRAGMA_CIA_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__CIA_H
  7. #include <powerup/ppcinline/cia.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #define    AbleICR(resource, mask)    _AbleICR(resource, mask)
  24.  
  25. static __inline WORD
  26. _AbleICR(struct Library *resource, long mask)
  27. {
  28. struct Caos    MyCaos;
  29.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  30. //    MyCaos.M68kStart    =    NULL;
  31. //    MyCaos.M68kSize        =    0;
  32.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  33. //    MyCaos.PPCStart        =    NULL;
  34. //    MyCaos.PPCSize        =    0;
  35.     MyCaos.a6        =(ULONG) resource;
  36.     MyCaos.d0        =(ULONG) mask;
  37.     MyCaos.caos_Un.Offset    =    (-18);
  38.     return((WORD)PPCCallOS(&MyCaos));
  39. }
  40.  
  41. #define    AddICRVector(resource, iCRBit, interrupt)    _AddICRVector(resource, iCRBit, interrupt)
  42.  
  43. static __inline struct Interrupt *
  44. _AddICRVector(struct Library *resource, long iCRBit, struct Interrupt *interrupt)
  45. {
  46. struct Caos    MyCaos;
  47.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  48. //    MyCaos.M68kStart    =    NULL;
  49. //    MyCaos.M68kSize        =    0;
  50.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  51. //    MyCaos.PPCStart        =    NULL;
  52. //    MyCaos.PPCSize        =    0;
  53.     MyCaos.a6        =(ULONG) resource;
  54.     MyCaos.d0        =(ULONG) iCRBit;
  55.     MyCaos.a1        =(ULONG) interrupt;
  56.     MyCaos.caos_Un.Offset    =    (-6);
  57.     return((struct Interrupt *)PPCCallOS(&MyCaos));
  58. }
  59.  
  60. #define    RemICRVector(resource, iCRBit, interrupt)    _RemICRVector(resource, iCRBit, interrupt)
  61.  
  62. static __inline void
  63. _RemICRVector(struct Library *resource, long iCRBit, struct Interrupt *interrupt)
  64. {
  65. struct Caos    MyCaos;
  66.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  67. //    MyCaos.M68kStart    =    NULL;
  68. //    MyCaos.M68kSize        =    0;
  69.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  70. //    MyCaos.PPCStart        =    NULL;
  71. //    MyCaos.PPCSize        =    0;
  72.     MyCaos.a6        =(ULONG) resource;
  73.     MyCaos.d0        =(ULONG) iCRBit;
  74.     MyCaos.a1        =(ULONG) interrupt;
  75.     MyCaos.caos_Un.Offset    =    (-12);
  76.     PPCCallOS(&MyCaos);
  77. }
  78.  
  79. #define    SetICR(resource, mask)    _SetICR(resource, mask)
  80.  
  81. static __inline WORD
  82. _SetICR(struct Library *resource, long mask)
  83. {
  84. struct Caos    MyCaos;
  85.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  86. //    MyCaos.M68kStart    =    NULL;
  87. //    MyCaos.M68kSize        =    0;
  88.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  89. //    MyCaos.PPCStart        =    NULL;
  90. //    MyCaos.PPCSize        =    0;
  91.     MyCaos.a6        =(ULONG) resource;
  92.     MyCaos.d0        =(ULONG) mask;
  93.     MyCaos.caos_Un.Offset    =    (-24);
  94.     return((WORD)PPCCallOS(&MyCaos));
  95. }
  96.  
  97. #endif /* SASC Pragmas */
  98. #endif /* !_PPCPRAGMA_CIA_H */
  99.